package com.easygem.common.model.front;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author 何维佳
 * @version 1.0
 * @className Clienttype
 * @Description TODO
 * @date 2024/12/26 19:31
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("")
@Table(name = "`clienttype`")
@Alias("FrontClientType")  // 👈 修改此处
public class ClientType {
    @Id
    @Column(name = "`clientTypeId`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer clientTypeId;

    @Column(name = "`options`")
    @ApiModelProperty("选项内容")
    private String options;

    // 归属人ID字段，可为空，对应数据库中可为NULL的情况
    @Column(name = "`sort`")
    @ApiModelProperty("排序")
    private Integer sort;

    // 归属人ID字段，可为空，对应数据库中可为NULL的情况
    @Column(name = "`enable`")
    @ApiModelProperty("是否采用")
    private Integer enable;

    // 创建时间字段，对应数据库中的timestamp类型
    @JsonFormat(timezone ="GMT+8",pattern ="yyyy-MM-dd HH:mm:ss")
    @Column(name = "`createTime`")
    @ApiModelProperty("创建时间")
    private Timestamp createTime;

    @Column(name = "`accountName`")
    @ApiModelProperty("账户名称")
    private String accountName;
}
